﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<SeaBattle.Domain.Entities.Game>>" %>
<div id="gamesList">
    <table>
        <tbody>
            <tr>
                <th>
                    Название
                </th>
                <th>
                    Игрок
                </th>
                <th>
                    Ставка
                    <input type="button" id="sortUp" value="Up" />
                    <input type="button" id="sortDown" value="Down" />
                </th>
                <th>
                </th>
            </tr>
            <%foreach (var game in Model)
              {%>
            <tr>
                <td>
                    <%:game.Name%>
                </td>
                <td>
                    <%:game.Creator.Login%>
                </td>
                <td>
                    <%:game.Preset %>
                </td>
                <th>
                    <input type="submit" onclick="joinGame('<%:game.Id %>')" value="Играть"/>
                </th>
            </tr>
            <%}%>
        </tbody>
    </table>
</div>
